const Main = () => import("@/views/Main")
const Home = () => import("@/views/Home")
const Login = () => import("@/views/Login")
const Organization = () => import("@/views/system/Organization")
const SysUser = () => import("@/views/system/SysUser")
const DictCategory = () => import("@/views/system/DictCategory")
const DictCategoryForm = () => import("@/views/system/DictCategoryForm")
const Dictionary = () => import("@/views/system/Dictionary")
const Post = () => import("@/views/system/Post")
const Resource = () => import("@/views/system/SysResource")
const Role = () => import("@/views/system/SysRole")

const routes = [{
	path: "/login",
	name: "login",
	component: Login,
	meta: {
		title: "登录"
	}
}, {
  path: "/",
  name: "main",
  component: Main,
  redirect: "home",
  children: [{
    name: "home",
    path: "/home",
    component: Home,
    meta: {
      title: "首页",
			componentName: "Home"
    }
  }, {
		name: "org",
		path: "/org",
		component: Organization,
		meta: {
			title: "组织机构管理",
			// componentName: "Organization"
		}
	}, {
		name: "usermanager",
		path: "/usermanager",
		component: SysUser,
		meta: {
			title: "用户管理",
			// componentName: "SysUser"
		}
	}, {
  	path: "/dict",
		redirect: {
  		name: "dictCategory"
		}
	}, {
		name: "dictCategory",
		path: "/dict/category/list",
		component: DictCategory,
		meta: {
			title: "字典管理",
			// componentName: "Dictionary"
		},
		children: []
	}, {
		// name: "dictCategoryForm",
		path: "/dict/category/form",
		component: DictCategoryForm,
		meta: {
			title: "字典分类表单"
		}
	}, {
  	name: "dict",
		path: "/dict/detail",
		component: Dictionary,
		meta: {
  		title: "字典数据"
		}
	}, {
		name: "post",
		path: "/post",
		component: Post,
		meta: {
			title: "岗位管理",
			// componentName: "Post"
		}
	}, {
		name: "resource",
		path: "/resource",
		component: Resource,
		meta: {
			title: "资源管理",
			// componentName: "SysResource"
		}
	}, {
		name: "role",
		path: "/role",
		component: Role,
		meta: {
			title: "角色管理",
			// componentName: "SysRole"
		}
	}]
}]

export default routes
